﻿using System.Reflection;

namespace DanielVaughan.Reflection
{
	public static class AssemblyExtensions
	{
		public static string GetShortName(this Assembly assembly)
		{
			ArgumentValidator.AssertNotNull(assembly, "assembly");

			string fullName = assembly.FullName;
			string shortName = fullName.Substring(0, fullName.IndexOf(','));
			return shortName;
		}
	}
}
